<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>复仇者计划后台管理</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="pragma" content="no-cache"/>
    <meta http-equiv="cache-control" content="no-cache"/>
    <meta http-equiv="expires" content="0"/>
    <!-- styles -->
    <link rel="stylesheet" type="text/css" href="../assets/common/jquery-easyui/themes/black/easyui.css"/>
    <link rel="stylesheet" type="text/css" href="../assets/common/jquery-easyui/themes/icon.css"/>
    <link rel="stylesheet" type="text/css" href="../assets/common/jquery-easyui-custom/easyui.custom.css"/>

    <!--&lt;!&ndash; scripts &ndash;&gt;-->
    <script type="text/javascript" src="../assets/common/jquery-easyui/jquery.min.js"></script>
    <script type="text/javascript" src="../assets/common/jquery-easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../assets/common/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="../assets/common/jquery-easyui-custom/easyui.custom.js"></script>
    <script type="text/javascript" src="../assets/common/framework.js"></script>

    <!-- page scripts -->
    <script type="text/javascript">

        function keyDown() {
            if (event.keyCode == 13) {
                event.returnValue = false;
                event.cancel = true;
                func_login();
            }
        }

        function func_login() {
            $('#fm').form('submit', {
                url: '/login',
                onSubmit: function () {
                    return $(this).form('validate');
                },
                success: function (data) {
                    var data = eval('(' + data + ')');

                    if (data.msg==null) {
                        window.location.href = '/html/resume.html';
                    } else {
                        $.messager.show({
                            title: '错误',
                            msg: data.msg,
                            showType: 'fade',
                            style: {
                                right: '',
                                bottom: ''
                            }
                        });
                    }
                }
            });
        }
    </script>
    <style type="text/css">
        .panel-header {
            height: 18px;
        }

        #nav {
            list-style-type: none;
            display: block;
            height: 21px;
            position: absolute;
            top: 40px;
            right: 5px;
        }

        #nav li {
            float: left;
            margin-left: -1px;
            padding: 3px 5px;
            line-height: 20px;
            position: relative;
        }

        #nav li a {
            line-height: 20px;
        }
    </style>


</head>

<body onkeydown="keyDown();">
<div id="dlg" class="easyui-dialog" style="width:400px;height:250px;"
     data-options="title:'用户登录',closable:false,buttons:'#dlg-btn'">
    <div class="easyui-layout" data-options="fit:true">
        <div data-options="region:'north',border:false"
             style="height:70px;overflow:hidden;border-bottom: 1px solid #95b8e7;">
            <img src="../../../assets/common/login/login.png"/>
        </div>
        <div data-options="region:'center',border:false" style="padding:20px 30px;">
            <form id="fm" method="post">
                <div style="text-align:center;">
                    <table style="border-width:0;" align="center">
                        <tr>
                            <td style="text-align: right;">用户名：</td>
                            <td><input type="text" id="username" name="username" class="easyui-textbox"
                                       data-options="required:true"/></td>
                        </tr>
                        <tr>
                            <td style="text-align: right;">密码：</td>
                            <td><input type="password" name="password" id="password" class="easyui-textbox"
                                       data-options="required:true"/></td>
                        </tr>
                    </table>
                </div>
            </form>
        </div>
    </div>
    <div id="dlg-btn">
        <a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-accept'"
           onclick="func_login()">登录</a>
        <a href="javascript:;" class="easyui-menubutton"
           data-options="iconCls:'icon-cog',menu:'#menu',plain:false">选项</a>
        <div id="menu" style="width:120px;">
            <div data-options="iconCls:'icon-tip'" onclick="$('#dlg-users').dialog('open').window('center')">说明</div>
            <div data-options="iconCls:'icon-help'" onclick="">帮助</div>
        </div>
    </div>
</div>
<div id="dlg-users" class="easyui-dialog" style="width:200px;padding:8px;"
     data-options="title:'用户列表',closed:true,buttons:'#dlg-btn-users'">
    <table id="pg-users"></table>
    <div id="dlg-btn-users">
        <a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'"
           onclick="$('#dlg-users').dialog('close')">关闭</a>
    </div>
</div>
</body>
</html>
